package com.summer.test.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "one_bean")
public class OneBean implements Serializable{

	private static final long serialVersionUID = 123456L;
	
	private String id;
	
	private String name;
	
	private ManyBean mb;

	@Id
	@Column(name = "id" , unique = true , nullable = false)
	public String getId() {
		return id;
	}
	@Column(name = "name")
	public String getName() {
		return name;
	}

	@ManyToOne
	@JoinColumn(name = "m_id")
	public ManyBean getMb() {
		return mb;
	}

	public void setId(String id) {
		this.id = id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setMb(ManyBean mb) {
		this.mb = mb;
	}
	
	
}
